<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/vue@next"></script>
</head>
<body>
    <div id="app"></div>
    <script>
const xiang={
        data(){
          return {
            hhh:"ksdkfkak"
          }
        },
        template:`<div >{{hhh}}</div>`
      }
   var app=Vue.createApp({
    components:{xiang},
        data() {
          return {
            message:1
          }
        },
        methods:{
          handlesjaj(){
           this.message+=1
          }
        },
        template: 
        `<xiang />

        <java :content='message' @sjaj='handlesjaj'/>
        `
      })
      app.component("java",{
        props:['content'],
        methods:{
          handleClick(){
            this.$emit('sjaj')
          }
        },
        template:`
        <div @click="handleClick">{{content}}</div>
        `
      })
      app.mount('#app');
    </script>
</body>
</html>